using System;
using System.Collections.Generic;
using System.Text;
using MCromwell.StaffIntranet.Task.Tasks;
using MCromwell.StaffIntranet.Core;

namespace MCromwell.StaffIntranet.Security
{
    public class LoginSessionChecker
    {
        IAuthenticationTask task = null;

        public LoginSessionChecker()
            : this(new AuthenticationTask())
        {
        }

        public LoginSessionChecker(IAuthenticationTask task)
        {
            if (task == null)
                throw new ArgumentNullException("task", "task cannot be null");

            this.task = task;
        }

        public bool CheckUsing(Guid SessionId)
        {
            return task.CheckSessionAgainst(SessionId);
        }

    }
}
